import React from 'react';

import styles from './title.css'

import arrowIcon from '../../../../icons/personal/arrow.png';
import writeIcon from '../../../../icons/personal/write-icon.png';

const title = ({
  goBack,
  titleName,
  showSaveBtnStatus=false,
  saveBtnName='',
  onSave=()=>{},
}) => {

  return(
    <div className={styles.title}>
      <img src={arrowIcon} className={styles.titleIcon} onClick={() => goBack()}/>
      <div className={styles.titleText}>{titleName}</div>
      {showSaveBtnStatus ? (
        <div className={styles.complete} onClick={() => onSave()}>{saveBtnName}</div>
      ):''}
    </div>
  )
}

export default title;
